package com.mis.clothespos.sale.service.impl;

import com.mis.clothespos.sale.domain.OrderToItem;
import com.mis.clothespos.sale.domain.Orederitem;
import com.mis.clothespos.sale.domain.Order;
import com.mis.clothespos.sale.domain.Payment;
import com.mis.clothespos.sale.mapper.OrderMapper;

import com.mis.clothespos.sale.mapper.OrderToItemMapper;
import com.mis.clothespos.sale.mapper.PaymentMapper;
import com.mis.clothespos.sale.service.saleService;
import com.mis.clothespos.sale.mapper.OrederitemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

@Service
@Primary
public class saleServiceImpl implements saleService {

    @Autowired
    OrederitemMapper orderitemMapper;
    @Autowired
    OrderMapper ordermappper;
    @Autowired
    OrderToItemMapper orderToItemMapper;
    @Autowired
    PaymentMapper paymentMapper;
    @Override
    public void insertSale(Orederitem item) {

        orderitemMapper.insert(item);

    }

    @Override
    public void inserOrder(Order order) {

        ordermappper.insert(order);

    }

    @Override
    public void insertOrderToItem(OrderToItem orderToItem) {
        orderToItemMapper.insert(orderToItem);

    }

    @Override
    public void insertPayTable(Payment payment) {
        paymentMapper.insert(payment);
    }

}
